fix(opencode): include linked directories in file search index#18291
fix(opencode): include linked directories in file search index#18291t7r0n wants to merge 2 commits intoanomalyco:devfrom
Conversation
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Added a follow-up fix for the Windows unit timeout seen on this PR. What changed:
Why:
Local validation:
|
47ff70f to
466840c
Compare
|
Rebased this branch on latest and resolved conflicts caused by the file module refactor.\n\nWhat I changed:\n- ported the symlink/junction indexing fix from to (current implementation location)\n- kept the regression test for linked directories in \n- preserved case-insensitive dedupe on Windows and guarded linked-target traversal to avoid recursive loops\n\nThis should clear the merge conflict state and keep behavior aligned with current architecture. |
Issue for this PR
Closes #18182
Type of change
What does this PR do?
@file autocomplete andfind.filesrely onFile.search(), which uses a cache built inFile.scan().That scan used
Ripgrep.files({ cwd })without following links, so files under junction/symlink directories were not indexed.This PR updates the scan to use
follow: trueand adds a regression test that creates a linkeddocsdirectory and verifiesdocs/linked/entry.tsis returned byFile.search().How did you verify your code works?
bunx prettier --check src/file/index.ts test/file/index.test.tsbun test --timeout 30000 test/file/index.test.ts -t "File.search()"bun test --timeout 30000 test/file/ripgrep.test.tsScreenshots / recordings
N/A (non-UI change)
Checklist